home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Sample Code / Inline Input for TextEdit / TSMTE Interfaces / CIncludes / TSMTE.h
Encoding:
C/C++ Source or Header  |  1993-12-10  |  1.4 KB  |  87 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        TSMTE.h
  3.  
  4.     Contains:    Definitions for TSMTE
  5.  
  6.     Copyright:    ©1991-1993 Apple Technology, Inc.
  7.                 All rights reserved.
  8.  
  9. */
  10.  
  11. #ifndef __TSMTE__
  12. #define __TSMTE__
  13.  
  14. #ifndef __TEXTEDIT__
  15. #include <TextEdit.h>
  16. #endif
  17.  
  18. #ifndef __DIALOGS__
  19. #include <Dialogs.h>
  20. #endif
  21.  
  22. #ifndef __TEXTSERVICES__
  23. #include <TextServices.h>
  24. #endif
  25.  
  26.  
  27. // signature, interface types
  28.  
  29. enum {
  30.     kTSMTESignature = 'tmTE',
  31.     kTSMTEInterfaceType = kTSMTESignature,
  32.     kTSMTEDialog = 'tmDI'
  33. };
  34.  
  35.  
  36. // Gestalt
  37.  
  38. enum {
  39.     gestaltTSMTEAttr = kTSMTESignature,
  40.     gestaltTSMTEPresent = 0,
  41.     gestaltTSMTE = gestaltTSMTEPresent,    // old name, for compatibility only
  42.     gestaltTSMTEVersion = 'tmTV',
  43.     gestaltTSMTE1 = 0x100
  44. };
  45.  
  46.  
  47. // update flag for TSMTERec
  48.  
  49. enum {
  50.     kTSMTEAutoScroll = 1
  51. };
  52.  
  53.  
  54. // callback procedure definitions
  55.  
  56. typedef pascal void (*TSMTEPreUpdateProcPtr)(TEHandle textH, long refCon);
  57.  
  58. typedef pascal void (*TSMTEPostUpdateProcPtr)(TEHandle textH, long fixLen,
  59.         long inputAreaStart, long inputAreaEnd,
  60.         long pinStart, long pinEnd, long refCon);
  61.  
  62.  
  63. // data types
  64.  
  65. struct TSMTERec
  66. {
  67.     TEHandle                textH;
  68.     TSMTEPreUpdateProcPtr    preUpdateProc;
  69.     TSMTEPostUpdateProcPtr    postUpdateProc;
  70.     long                    updateFlag;
  71.     long                    refCon;
  72. };
  73. typedef struct TSMTERec TSMTERec, *TSMTERecPtr, **TSMTERecHandle;
  74.  
  75.  
  76. struct TSMDialogRecord
  77. {
  78.     DialogRecord    fDialog;
  79.     TSMDocumentID    fDocID;
  80.     TSMTERecHandle    fTSMTERecH;
  81.     long            fTSMTERsvd[3];            // reserved
  82. };
  83. typedef struct TSMDialogRecord TSMDialogRecord, *TSMDialogPeek;
  84.  
  85. #endif
  86.  
  87.